package com.kingyun.gpsinspection.purificationservice.services.iam.outerservice.adm;

import com.kingyun.gpsinspection.purificationservice.dao.mapper.iam.adm.CertificateTypeMapper;
import com.kingyun.gpsinspection.purificationservice.facade.model.iam.adm.CertificateType;
import com.kingyun.gpsinspection.purificationservice.facade.service.iam.adm.OutCertificateTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by ${yangsy} on 2016/12/20.
 */
@Service
public class OutCertificateTypeServiceImpl implements OutCertificateTypeService {
    @Autowired
    private CertificateTypeMapper certificateTypeMapper;

    @Override
    public List<CertificateType> queryCertificateByName(String name, String type)
    {
        Map<String,Object> map = new HashMap<>();
        if(!"".equals(name)){
            map.put("name",name);
            map.put("type",type);
            return  certificateTypeMapper.queryCertificateByName(map);
        }else{
            return  certificateTypeMapper.queryCertificateByName(map);
        }
    }
}
